<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.min.css" rel="stylesheet" />
	</head>
	<style type="text/css">
		#iff {
			width: 100%;
			height: 500%;
		}
	</style>

	<body>
		<div class="mui-content" style="height: 100%;">
			<iframe id="iff" src="" width="" height="" frameborder="0"></iframe>
		</div>

		<script src="js/mui.min.js"></script>
		<script type="text/javascript">
			mui.init();
			var isios = 0;
			//判断终端开始
			var browser = {
				versions: function() {
					var u = navigator.userAgent,
						app = navigator.appVersion;
					return {
						trident: u.indexOf('Trident') > -1, //IE内核
						presto: u.indexOf('Presto') > -1, //opera内核
						webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
						gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
						mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
						ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
						android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或者uc浏览器
						iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
						iPad: u.indexOf('iPad') > -1, //是否iPad
						webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
						weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
						qq: u.match(/\sQQ/i) == " qq" //是否QQ
					};
				}(),
				language: (navigator.browserLanguage || navigator.language).toLowerCase()
			}
			if(browser.versions.ios) {
				isios = 1;
			}

			function GetQueryString(key) {
				// key为url变量名称
				var urlGets = location.search.substr(1);
				if(urlGets.length > 0) {
					start = urlGets.indexOf(key + '=');
					if(start != -1) {
						start = start + key.length + 1;
						end = urlGets.indexOf('&', start)
						if(end == -1) {
							end = urlGets.length
						}
						return decodeURIComponent(urlGets.substring(start, end))
					}
				}
				return '';
			}
			//			var id=GetQueryString("id");
			var id = 2;

			var u = navigator.userAgent;
			var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端  

//			       console.log(navigator.userAgent);
//			       alert(navigator.userAgent);
			//    alert(iosnum);
			if(isios == 1) {
				var info = navigator.userAgent;
				var osinfo = info.split(";");
				var version = osinfo[1].split(" ")[4];
				var iosnum = version.split("_")[0];
				if(iosnum >= 9) {
					window.location.href = "jkw://id=" + id;
				} else {
					document.getElementById("iff").src = "jkw://id=" + id;
				}
			} else {
				var uu=navigator.userAgent.split("/")[0];
//				if(uu=="Mozilla"){
//					window.location.href = "jkw://id=" + id;
//				}else{
					document.getElementById("iff").src = "jkw://id=" + id;
//				}
			}

			setTimeout(function() {
			window.location.href = "getApp.html";
			}, 1000)
		</script>
	</body>

</html>